package cn.ipokerface.api.annotation;

import java.lang.annotation.*;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Created by       PokerFace
 * Create Date      2019-12-10.
 * Email:           <a href="mailto:214888341@163.com">214888341@163.com</a>
 * Version          1.0.0
 * <p>
 * Description:
 */



@Target({ElementType.METHOD, ElementType.FIELD })
@Retention(RUNTIME)
@Documented
@Repeatable(ApiDefine.ApiDefines.class)
public @interface ApiDefine {


    /**
     * Define a value of this document.
     *
     * such as
     * <code>@ApiDefine(name="schema", value="http")</code>
     * output as
     * <code>
     *     <tb>
     *         <tr>
     *             <td>schema</td>
     *             <td>http</td>
     *         </tr>
     *     </tb>
     * </code>
     *
     */
    String name();

    /**
     *
     * {@link ApiDefine#name()}
     */
    String value();


    @Target({ElementType.METHOD, ElementType.FIELD })
    @Retention(RUNTIME)
    @Documented
    public @interface ApiDefines{

        ApiDefine[] value();
    }
}
